home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_11
/
allison
/
tstr2.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1994-09-05
|
299b
|
21 lines
LISTING 6 - Tests string class with deep copy
// tstr2.cpp
#include <iostream.h>
#include "str2.h"
main()
{
string s("hello"), t = s;
t[0] = 'j';
cout << "s == " << s << endl;
cout << "t == " << t << endl;
return 0;
}
/* Output:
s == hello
t == jello
*/